﻿using BeerStats.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BeerStats.Data.Mappings
{
    public class BeerTypeMap : EntityTypeConfiguration<BeerType>
    {
        public BeerTypeMap()
        {
            this.HasKey(b => b.Id);

            this.Property(b => b.Name)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(b => b.Description)
                .IsRequired()
                .HasMaxLength(1000);
        }
    }
}
